package com.ybwh.springboot2.filetree.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.google.common.base.Preconditions;
import com.ybwh.springboot2.filetree.mapper.FileTreeMapper;
import com.ybwh.springboot2.filetree.model.entity.FileTree;
import com.ybwh.springboot2.filetree.service.FileTreeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 文件树模型服务接口实现类
 * </p>
 *
 * @author youbeiwuhuan
 * @version V1.0
 * @since 2023-05-27 11:11:25
 */
@Slf4j
@Service
public class FileTreeServiceImpl implements FileTreeService {
    @Resource
    private FileTreeMapper fileTreeMapper;


    @Override
    public PageInfo<FileTree> queryByPage(FileTree param, int pageNum, int pageSize) {
        Preconditions.checkArgument(pageNum > 0);
        Preconditions.checkArgument(pageSize > 0);

        Page<FileTree> page = fileTreeMapper.selectByPage(param, pageNum, pageSize);

        return new PageInfo<>(page);
    }


//------------以上是生成代码-----------------------------------------------------------------------------------------------------------------


}
